import request from '@/utils/request';
//新增地图书签
export function addBookMark(data) {
  return request({
    url: `getinfo/map-bookmark/edit-permission/addMapBookMark`,
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
    responseType: 'blob',
  })
}
//获取地图书签列表
export function getBookMarkList(data) {
  return request({
    url: `getinfo/map-bookmark/listMapBookMark`,
    method: 'get',
    data: data
  })
}
//删除地图书签
export function deleteBookMark(data) {
  return request({
    url: `getinfo/map-bookmark/delMapBookMark?id=${data}`,
    method: 'get',
    data: data
  })
}
//模糊查询地图书签
export function searchBookMark(data) {
  return request({
    url: `getinfo/map-bookmark/searchMapBookMark?name=${data}`,
    method: 'get',
    data: data
  })
}

//地名地址定位
export function getPlaceLocation(data) {
  return request({
    url: `getinfo/map-bookmark/returnPosition?placeName=${data}`,
    method: 'get',
  })
}

export function getFavouritePlace(data) {
  return request({
    url: `getinfo/map-bookmark/returnFavourite?favouriteName=${data}`,
    method: 'get',
  })
}
//获取转换后坐标
export function getWgs84toSz2000(data) {
  return request({
    url: `/dmgis/pws/CallPlugin/Func?methodName=conv&postdata=${data}`,
    method: 'get',
  })
}
